package com.example.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.example.mapper.ContactConfigMapper;
import com.example.model.entity.ContactConfig;
import com.example.service.ContactConfigService;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 联系方式配置服务实现类
 */
@Service
public class ContactConfigServiceImpl extends ServiceImpl<ContactConfigMapper, ContactConfig> implements ContactConfigService {
    
    @Override
    public List<ContactConfig> listContactConfigs() {
        LambdaQueryWrapper<ContactConfig> queryWrapper = new LambdaQueryWrapper<>();
        queryWrapper.eq(ContactConfig::getIsActive, true)
                .orderByAsc(ContactConfig::getSortOrder);
        return list(queryWrapper);
    }
} 